#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void Changes(char* ps, int len)
{
	char tmp = ps[0];

	for (int i = 0; i < len - 2 ; i++)
	{
		*(ps + i) = *(ps + i + 1);
	}
	*(ps + len - 2) = tmp;
	int left = 0;
	int right = len - 3;
	while (left < right)
	{
		 char tmp1 = *(ps + left);
		*(ps + left) = *(ps + right);
		*(ps + right) = tmp1;
		left++;
		right--;
	}
}
int main()
{
	char str[] = "ABCD";
	int len = sizeof(str) / sizeof(str[0]);
	Changes(str,len);

	printf("%s\n",str);

	return 0;
}